<?php

/* @var $this yii\web\View */
/* @var $form yii\bootstrap\ActiveForm */
/* @var $model \common\models\LoginForm */

use yii\helpers\Html;
use yii\bootstrap\ActiveForm;

$this->title = '修改密码';
$this->params['breadcrumbs'][] = $this->title;
?>
    <style>
        body{
            background: #f9f9f9;
        }
        .registerform li{
            padding-bottom:25px;
            zoom: 1;
            overflow: hidden;
        }
        .registerform .label{
            display:block;
            width:73px;
            margin: 0;
            font-size: 14px;
            color: #444444;
            padding-top: 4px;
            padding-right: 5px;
            float: left;
            text-align: right;
        }
        .registerform .inputxt{
            border: 1px solid #d2d2d2;
            width:200px;
            float: left;
        }
        .action{
            margin-top: 10px;
        }
        .Validform_checktip{
            height: 33px;
            line-height: 33px;
            margin-left: 0;
        }
        .yzmsubinput{
            -webkit-border-radius: 5px;
            -moz-border-radius: 5px;
            border-radius:5px;
            background-color: #da444d;
        }
        .yzmsub{
            padding-left: 82px;
        }
        .adspae{
            font-size: 14px;
            color: #999999;
            margin-left: 10px;
            vertical-align: middle;
        }

    </style>

            <div class="rwidt">
                <div class="rigtable">
                    <h3 class="grh3tit">修改密码</h3>
                    <div class="rwform pl15 pr15">
                    <h4 class="twodlcontitle">           
                                         <label style="color: red">
                                            <?php
                                            if(\Yii::$app->getSession()->getFlash("success")) {
                                                echo \Yii::$app->getSession()->getFlash("success");
                                            }
                                            ?>
                                        </label>
                                        </h4>
                        <form class="registerform mt25" action="<?= yii\helpers\Url::to(['member/update']);?>" id="subform" method='post' onsubmit="return pw()" >
                        <input name="_csrf" type="hidden" id="_csrf" value="<?= Yii::$app->request->csrfToken ?>">
                            <ul>
                                <li>
                                    <label class="label">当前密码：</label>
                                    <input type="password" name="oldpassword" class="inputxt" placeholder="当前密码"/>
                                </li>
                                <li>
                                    <label class="label">新密码：</label>
                                    <input id="pw1" type="text" name="password" class="inputxt" style="width: 120px" placeholder="密码"/>
                                </li>
      
                                <li>
                                    <label class="label">确认密码：</label>
                                    <input id="pw2" type="text" name="repassword" class="inputxt" style="width: 120px" placeholder="重复密码"/>
                                </li>

                            </ul>
                            <div class="action">
                                <div class="clearFloat">
                                    <div class="yzmsub floatLeft">
                                        <input type="submit" value="确认" class="yzmsubinput"/>
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
    <script>
          function pw() {
              var pw1 = document.getElementById("pw1").value;
              var pw2 = document.getElementById("pw2").value;
              if(pw1 != pw2) {
                  alert("两次输入的密码不正确！");
				  return false;
              }else{
				  return true;
			  }
          }
      </script>
        